project. Set the project name to prjRDO and the form name to frmRDO. Save the empty form as FRMRDO.FRM and the project as PRJRDO.VBP. In each of the following sections, you add code that illustrates each of the RDO objects.
The rdoEngine Object
The rdoEngine object is the top-level object in the RDO collection. This object has only a handful of parameters and has no collection of its own. You can have only one rdoEngine instance in your Visual Basic programs. Add a new command button to your form. Set its Name property to cmdRDOEngine and its Caption to RDO Engine. Now add the code in Listing 18.7 to the cmdRDOEngine_Click event.
Listing 18.7. Coding the cmdRDOEngine_Click event.
Private Sub cmdRDOEngine_Click()
'
' show rdo engine properties
'
Dim strMsg As String
Dim rdoEng As rdoEngine
Dim aryCursorDriver As Variant
'
aryCursorDriver = Array("rdUseIfNeeded", "rdUseOdbc", "rdUseServer", "rdUseClientBatch", "rduseNone")
'
Set rdoEng = rdoEngine
'
strMsg = strMsg & "rdoDefaultCursorDriver=" & aryCursorDriver(rdoEng.rdoDefaultCursorDriver) & vbCrLf
strMsg = strMsg & "rdoDefaultErrorThreshold=" & CStr(rdoEng.rdoDefaultErrorThreshold) & vbCrLf
strMsg = strMsg & "rdoDefaultLoginTimeOut=" & CStr(rdoEng.rdoDefaultLoginTimeout) & vbCrLf
strMsg = strMsg & "rdoDefaultPassword=" & rdoEng.rdoDefaultPassword & vbCrLf
strMsg = strMsg & "rdoDefaultUser=" & rdoEng.rdoDefaultUser & vbCrLf
strMsg = strMsg & "rdoLocaleID=" & CStr(rdoEng.rdoLocaleID) & vbCrLf
strMsg = strMsg & "rdoVersion=" & CStr(rdoEng.rdoVersion) & vbCrLf
'
MsgBox strMsg, vbInformation, "RDOEngine"
'
Set rdoEng = Nothing
'
End Sub
Save and run the project. After you click the RDO Engine command button, you should see something like the message in Figure 18.7.